package com.example.demo.service;

import com.example.demo.entity.User;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @Author: yucsa
 * @Date: 2021/8/22 23:03
 */
public interface UserService {
    /**
     * 通过username查询用户
     * @param userName 用户名
     * @return 用户实例
     */
    public User findByName(String userName);

    public User findById(Long id);

    public String register(String username,String password);

    public Integer addRegUser(User regUser);

    public String logout();

    public String login(String username, String password, String type, HttpSession httpSession);

    //查询所有用户
    public List<User> queryUserList(Integer index , Integer limit);

    //更新用户
    public Integer updateUser(User user);

    //删除用户
    public Integer deleteUser(Long id);
}
